/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

export function getPage(query) {
  return request({
    url: '/appr-contract/workAssigncj/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/appr-contract/workAssigncj',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/appr-contract/workAssigncj/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/appr-contract/workAssigncj/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/appr-contract/workAssigncj',
    method: 'put',
    data: obj
  })
}

// 合同保存
export function saveHtong(query) {
  return request({
    url: '/appr-contract/workAssigncj/saveHtong',
    method: 'post',
    data: query
  })
}

// 批量删除
export function deleteBatchHtcj(query) {
  return request({
    url: '/appr-contract/workAssigncj/deleteBatch',
    method: 'get',
    params: query
  })
}
// 发起签订
export function faqiqianding(id) {
  return request({
    url: '/appr-contract/workAssigncj/faqiqianding/'+id,
    method: 'get'
  })
}
// 任务书推送拟定
export function renwundts(query) {
  return request({
    url: '/appr-contract/workAssigncj/Renwundts',
    method: 'get',
    params: query
  })
}

// 推送文本审核
export function tuisongwenben(id) {
  return request({
    url: '/appr-contract/workAssigncj/tuisongwenben/'+id,
    method: 'get'
  })
}

// 获取指标拟定部分
export function getNiDingList(query) {
  return request({
    url: '/appr-contract/workAssigncj/getNiDingList',
    method: 'get',
    params: query
  })
}



// 主管领导
export function getZhuguanTree(query) {
  return request({
    url: '/appr-contract/workAssigncj/getZhuguanTree',
    method: 'get',
    params: query
  })
}


export function wbshok(query) {
  return request({
    url: '/appr-contract/workAssigncj/wbshok',
    method: 'post',
    data: query

  })
}
export function wbshback(query) {
  return request({
    url: '/appr-contract/workAssigncj/wbshback',
    method: 'post',
    data: query

  })
}

export function wbshOkAll(data,type) {

  return request({
    url: '/appr-contract/workAssigncj/wbshOkAll?type='+type,
    method: 'post',
    data: data

  })
}
